/*
 * To change this license header, choose License Headers in Project Properties.
 * To change this template file, choose Tools | Templates
 * and open the template in the editor.
 */

package koncowka;

import java.util.ArrayList;
import java.util.Date;
import java.util.List;

/**
 *
 * @author root
 */
public class Ap {
    private String BSSID;
    private Date firstSeen;
    private Date lastSeen;
    private Integer chanell;
    private Integer speed;
    private Integer power;
    private String ESSID;
    private String key;
    
    private List<Klient> listaKlientow;
    
    

    public Ap(String BSSID,Date firstSeen,Date lastSeen,Integer chanell,Integer speed,Integer power,String ESSID,String key)
    {
        this.BSSID=BSSID;
        this.firstSeen=firstSeen;
        this.lastSeen=lastSeen;
        this.chanell=chanell;
        this.speed=speed;
        this.power=power;
        this.ESSID=ESSID;
        this.key=key;
        listaKlientow = new ArrayList<Klient>();
    }

    public Ap() {
        this.listaKlientow = new ArrayList<Klient>();
    }
    
    

    public String getBSSID() {
        return BSSID;
    }

    public String getESSID() {
        return ESSID;
    }


    public void setBSSID(String BSSID) {
        this.BSSID = BSSID;
    }

    public void setESSID(String ESSID) {
        this.ESSID = ESSID;
    }

    public Integer getChanell() {
        return chanell;
    }

    public Date getFirstSeen() {
        return firstSeen;
    }

    public String getKey() {
        return key;
    }

    public Date getLastSeen() {
        return lastSeen;
    }

    public Integer getPower() {
        return power;
    }

    public Integer getSpeed() {
        return speed;
    }

    public List<Klient> getListaKlientow() {
        return listaKlientow;
    }
    

    public void setChanell(Integer chanell) {
        this.chanell = chanell;
    }

    public void setFirstSeen(Date firstSeen) {
        this.firstSeen = firstSeen;
    }

    public void setKey(String key) {
        this.key = key;
    }

    public void setLastSeen(Date lastSeen) {
        this.lastSeen = lastSeen;
    }

    public void setPower(Integer power) {
        this.power = power;
    }

    public void setSpeed(Integer speed) {
        this.speed = speed;
    }

    public void setListaKlientow(List<Klient> listaKlientow) {
        this.listaKlientow = listaKlientow;
    }
    

    @Override
    public boolean equals(Object o) {
        if(o instanceof Ap)
        {
            return ((Ap)o).BSSID.equals(this.BSSID);
                        
        }else
            return false;
    }

    void update(Ap ap) {
        this.chanell=ap.getChanell();
        this.firstSeen=ap.getFirstSeen();
        this.lastSeen=ap.getLastSeen();
        this.power=ap.getPower();
        this.speed=ap.getSpeed();
        this.ESSID=ap.getESSID();
        this.key=ap.getKey();
    }

    @Override
    public String toString() {
        return this.BSSID +" "+ this.ESSID;
    }


}
